package com.glink.manage.dto.attendance;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class AttendanceAddDTO {

    @NotBlank(message = "身份证不能为空")
    @ApiModelProperty(value = "身份证")
    private String card;

    @NotBlank(message = "姓名不能为空")
    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "参建单位")
    private String unitObjId;

    @NotBlank(message = "打卡日期不能为空")
    @ApiModelProperty(value = "打卡日期")
    @Pattern(regexp = "\\d{4}-\\d{2}-\\d{2}", message = "日期格式必须为 yyyy-MM-dd")
    private String checkinDate;

    @NotBlank(message = "打卡时间不能为空")
    @ApiModelProperty(value = "打卡时间")
    @Pattern(regexp = "\\d{2}:\\d{2}:\\d{2}", message = "时间格式必须为 HH:mm:ss")
    private String checkinTime;
}
